import require from '@/utils/request.js'
import {
  setUrl
} from '@/utils/util.js'



// 获取学历信息列表    /employee/getEducationList
export function getEducationList(id) {
  return require({
    url: `/employee/getEducationList?id=${id}`,
    method: 'get'
  })
}


// 添加学历信息
export function insetEducationInfo(data, sava) {
  return require({
    url: `/employee/insetEducationInfo?sava=${sava}`,
    method: 'post',
    data
  })
}


// 获取职称信息列表  /employee/getTitleList
export function getTitleList(id) {
  return require({
    url: `/employee/getTitleList?id=${id}`
  })
}


// 添加职称信息
export function insertTitleInfo(data, sava) {
  return require({
    url: `/employee/insertTitleInfo?sava=${sava}`,
    method: 'post',
    data
  })
}


// 获取技能信息列表  /employee/getSkillList?id=12
export function getSkillList(id) {
  return require({
    url: `/employee/getSkillList?id=${id}`
  })
}


// 添加技能信息
export function insertSkillInfo(data, sava) {
  return require({
    url: `/employee/insertSkillInfo?sava=${sava}`,
    method: 'post',
    data
  })
}


// 切换最高学历  最高职称 最高技能    /employee/isMaxInfo?employeeId=1&otherId=1&type=1
export function isMaxInfo(data) {
  const url = setUrl('/employee/isMaxInfo', data)
  return require({
    url,
    method: 'put'
  })
}


// 删除学历信息
export function deleteEducation(data) {
  const url = setUrl('/employee/deleteEducation', data)
  return require({
    url,
    method: 'delete'
  })
}

// 删除职称信息
export function deleteEmployeeTitle(data) {
  const url = setUrl('/employee/deleteEmployeeTitle', data)
  return require({
    url,
    method: 'delete'
  })
}

// 删除技能证书
export function deleteEmployeeSkill(data) {
  const url = setUrl('/employee/deleteEmployeeSkill', data)
  return require({
    url,
    method: 'delete'
  })
}